package org.heydr.remote;

import java.util.List;

import org.heydr.entity.Info;
import org.heydr.entity.Site;
import org.heydr.entity.Task;
import org.heydr.entity.Url;

public interface RMIService {
	
	/**
	 * <strong>Description</strong>:get available site from database
	 * @return
	 * @return List<Site>
	 * @author carlos.xie
	 * 2013-6-6
	 */
	public List<Site> availableSites();
	
	/**
	 * <strong>Description</strong>:get urls from database
	 * @param size
	 * @return
	 * @return List<Url>
	 * @author carlos.xie
	 * 2013-6-6
	 */
	public Task availableTasks(String ip,int size);
	
	/**
	 * <strong>Description</strong>:store successful crawled infos
	 * @param infos
	 * @return void
	 * @author carlos.xie
	 * 2013-6-6
	 */
	public void storeInfos(List<Info> infos);
	
	/**
	 * inform master which urls were done
	 * <strong>Description</strong>:
	 * @param urls
	 * @return void
	 * @author carlos.xie
	 * 2014-1-21
	 */
	public void finishedTasks(List<Url> urls);
	
}